class BugColumnsController < ApplicationController
  # GET /bug_columns
  # GET /bug_columns.xml
  def index
    @bug_columns = BugColumn.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @bug_columns }
    end
  end

  # GET /bug_columns/1
  # GET /bug_columns/1.xml
  def show
    @bug_column = BugColumn.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @bug_column }
    end
  end

  # GET /bug_columns/new
  # GET /bug_columns/new.xml
  def new
    @bug_column = BugColumn.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @bug_column }
    end
  end

  # GET /bug_columns/1/edit
  def edit
    @bug_column = BugColumn.find(params[:id])
  end

  # POST /bug_columns
  # POST /bug_columns.xml
  def create
    @bug_column = BugColumn.new(params[:bug_column])

    respond_to do |format|
      if @bug_column.save
        flash[:notice] = 'BugColumn was successfully created.'
        format.html { redirect_to(@bug_column) }
        format.xml  { render :xml => @bug_column, :status => :created, :location => @bug_column }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @bug_column.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /bug_columns/1
  # PUT /bug_columns/1.xml
  def update
    @bug_column = BugColumn.find(params[:id])

    respond_to do |format|
      if @bug_column.update_attributes(params[:bug_column])
        flash[:notice] = 'BugColumn was successfully updated.'
        format.html { redirect_to(@bug_column) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @bug_column.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /bug_columns/1
  # DELETE /bug_columns/1.xml
  def destroy
    @bug_column = BugColumn.find(params[:id])
    @bug_column.destroy

    respond_to do |format|
      format.html { redirect_to(bug_columns_url) }
      format.xml  { head :ok }
    end
  end
end
